1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92
| new Vue({ el:"#app", data:function(){ return { param:{ columns:[ { index:"id",isCheckbox:true }, { index:"id",isDetailRow:true }, { index:"name",label:"Name",sortable:true,width:30 }, { index:"sender",label:"Sender",sortable:true,width:30,callback:this.formatSender }, { index:"comments",label:"comments",sortable:false,width:38,component_name:"comments" } ], dataSet:[ { id:1,name:"aaa",sender:"aaa@domain.com","comments":"this is a test" }, { id:2,name:"bbb",sender:"bbb@domain.com","comments":"this is a test" }, { id:4,name:"ccc",sender:"ccc@domain.com","comments":"this is a test" } ,{ id:4,name:"ddd",sender:"ddd@domain.com","comments":"this is a test" } ,{ id:5,name:"eee",sender:"eee@domain.com","comments":"this is a test" } ,{ id:6,name:"fff",sender:"fff@domain.com","comments":"this is a test" } ,{ id:7,name:"ggg",sender:"ggg@domain.com","comments":"this is a test" } ,{ id:9,name:"hhh",sender:"hhh@domain.com","comments":"this is a test" } ,{ id:10,name:"iii",sender:"hhh@domain.com","comments":"this is a test" } ,{ id:11,name:"jjj",sender:"hhh@domain.com","comments":"this is a test" } ,{ id:12,name:"kkk",sender:"hhh@domain.com","comments":"this is a test" } ,{ id:13,name:"lll",sender:"hhh@domain.com","comments":"this is a test" } ,{ id:14,name:"mmm",sender:"hhh@domain.com","comments":"this is a test" } ,{ id:15,name:"nnn",sender:"hhh@domain.com","comments":"this is a test" } ,{ id:16,name:"ooo",sender:"hhh@domain.com","comments":"this is a test" } ,{ id:17,name:"ppp",sender:"hhh@domain.com","comments":"this is a test" } ,{ id:18,name:"qqq",sender:"hhh@domain.com","comments":"this is a test" } ], sortOrder:"asc", sortColumn:"name", height:300, detailRowComponentName:"col-detail", stripe:true } } }, methods:{ reloadTable:function(){ this.local_param.reloadFlag = !this.local_param.reloadFlag; }, formatSender:function(cell_value,row){ return '<b style="color:red;">'+cell_value+'</b>'; } } });
|